import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../layout/Home.vue'
import Goods from '../views/Goods'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/',
        component: Goods
      },
      {
        path: '/score',
        component: () =>
          import(/* webpackChunkName: "score" */ '../views/Score')
      },
      {
        path: '/shop',
        component: () => import(/* webpackChunkName: "shop" */ '../views/Shop')
      }
    ]
  }
]
// component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')

const router = new VueRouter({
  routes
})

export default router
